<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head lang="en">
	<meta charset="UTF-8">
	<title>百朋后台管理系统</title>
	<link rel="stylesheet" type="text/css" href="/tp_bypal/Public/easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="/tp_bypal/Public/easyui/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="/tp_bypal/Public/easyui/demo.css">
	<script type="text/javascript" src="/tp_bypal/Public/easyui/jquery.min.js"></script>
	<script type="text/javascript" src="/tp_bypal/Public/easyui/jquery.easyui.min.js"></script>
</head>
<style type="text/css">
	.input 
	{
		border: 1px solid #eaeaea;
		background-color: #6d654e;
		color: #fff;
		text-align: center;
		padding: 0px 10px -1px;
		border-radius: 4px;
	}
</style>
<body>
	<div>
        <div class="easyui-panel" style="padding:5px;">
            <a href="javascript:;" class="easyui-linkbutton" onclick="status_table(1);" data-options="plain:true,iconCls:'icon-more'" >等待放款</a>
            <a href="javascript:;" class="easyui-linkbutton" onclick="status_table(3);" data-options="plain:true,iconCls:'icon-more'" >进行中</a>
            <a href="javascript:;" class="easyui-linkbutton" onclick="status_table(4);" data-options="plain:true,iconCls:'icon-more'">已完成</a>
            <a href="javascript:;" class="easyui-linkbutton" onclick="status_table(5);" data-options="plain:true,iconCls:'icon-more'">已取消</a>
            <a href="javascript:;" class="easyui-linkbutton" onclick="status_table(10);" data-options="plain:true,iconCls:'icon-more'">进行中和已完成</a>
        </div>
		<table id="default_table" title="订单列表" style="width:100%;min-height:372px;"
			data-options="
				fitColumns:true,
				showFooter:true,
				rowStyler:function(value,row,index){
					if (row.fac_simple_name == '总本金:' || row.fac_simple_name == '存量本金:'){
						return 'background-color:#e0ecff;color:#black;font-weight:bold;';
					}
				},
				remoteSort:false,
				rownumbers:true,
				singleSelect:true,
				autoRowHeight:false,
				url:'../../borrow/borrowbusiness/borrowbusiness_main',
				pagination:true,
				pageSize:10,toolbar:'#tb'
			"
		>
			<thead>
				<tr>
					<!--<th field="borrow_id" width="9%" align="center">分期编号</th>
					<th field="name" width="7%" align="center">商户类型</th>
					<th field="fac_simple_name" width="8%" align="center">商户简称</th>
					<th field="borrow_money" width="9%" align="center">分期金额</th>
					<th field="borrow_rate" width="7%" align="center">利率</th>
					<th field="borrow_loanperiod" width="7%" align="center">分期期限</th>
					<th field="cust_name" width="10%" align="center">客户姓名</th>
					<th field="binfo_opendate" width="9%" align="center">放款时间</th>
					<th field="end_date" width="7%" align="center">下期还款</th>
					<th field="borrow_invest" width="11%" align="center">投资打包</th>
					<th field="bsta_name" width="6%" align="center">分期状态</th>-->
					<!--<th field="action" width="9%" align="center" formatter="formatAction">操作</th>-->
				</tr>
			</thead>
		</table>
	</div>
	<div id="tb" style="padding:5px;height:auto">
		<form action="../../borrow/borrowbusiness/borrowbusiness_list" method="post" id="searchTable">
            <div style="margin-bottom:5px" id="tb_button">
                <!--<a href="#" class="easyui-linkbutton" onclick="borrowbusiness_detail();" iconCls="icon-man" plain="true">详情</a>
                <a href="javscript:;" onclick="paymoney();" class="easyui-linkbutton" iconCls="icon-money" plain="true">放款</a>-->
            </div>
			<div>
                <input type="hidden" name="select_borrowStatus" id="select_borrowStatus" value="<?php echo ($search_array["select_borrowStatus"]); ?>"/>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;借款编号
				<input class="easyui-textbox" id="select_borrowNum" name="select_borrowNum" value="<?php echo ($search_array["select_borrowNum"]); ?>" style="width:100px">&nbsp;&nbsp;
				客户姓名
				<input class="easyui-textbox" id="select_custName" name="select_custName" value="<?php echo ($search_array["select_custName"]); ?>" style="width:100px">&nbsp;&nbsp;
                商户简称
                <input class="easyui-textbox" id="select_facName" name="select_facName" value="<?php echo ($search_array["select_facName"]); ?>" style="width:100px">&nbsp;&nbsp;
				借款状态
				<select class="easyui-combobox selector" id="select_delayStatus" name="select_delayStatus" panelHeight="auto" style="width:100px" data-options="editable:false">
					<option value="">请选择</option>
					<option value="1">有延期</option>
                    <option value="2">无延期</option>
				</select>&nbsp;&nbsp;
				<script type="text/javascript">$("#select_delayStatus").find("option[value='<?php echo ($search_array["select_delayStatus"]); ?>']").attr("selected",true);</script>
				借款申请日期
				<input class="easyui-datebox" id="select_start_time" data-options="formatter:myformatter,parser:myparser,editable:false" name="select_start_time" value="<?php echo ($search_array["select_start_time"]); ?>" style="width:100px">--
                <input class="easyui-datebox" id="select_end_time" data-options="formatter:myformatter,parser:myparser,editable:false" name="select_end_time" value="<?php echo ($search_array["select_end_time"]); ?>" style="width:100px">
				<!-- <a href="javascript:;" onclick="borrowbusiness_add();" class="easyui-linkbutton" iconCls="icon-add">新增</a>&nbsp;&nbsp; -->
				<a href="javascript:;" onclick="submitSearch();" class="easyui-linkbutton" iconCls="icon-search">查询</a>&nbsp;&nbsp;
				<a href="javascript:;" onclick="resetSearch();" class="easyui-linkbutton" iconCls="icon-clear">重置</a>
			</div>
		</form>
	</div>

	<script type="text/javascript" src="/tp_bypal/Public/js/common.js"></script>
    <script type="text/javascript" src="/tp_bypal/Public/js/button.js"></script>
    <script type="text/javascript" src="/tp_bypal/Public/js/borrow/borrowbusiness_list.js"></script>
	<script type="text/javascript">
		$(function() 
		{
//			var json = '<?php echo ($json_list); ?>';
//			var array = JSON.parse(json);
//			$('#default_table').datagrid({loadFilter:pagerFilter}).datagrid('loadData', array);
            $('#default_table').datagrid({
                title:"进行中",
                columns: [[
                    {field: 'borrow_id', title: '分期编号', width: '9%'},
                    {field: 'name', title: '商户类型', width: '7%'},
                    {field: 'fac_simple_name', title: '商户简称', width: '8%'},
                    {field: 'borrow_money', title: '分期金额', width: '9%'},
                    {field: 'borrow_rate', title: '利率', width: '7%'},
                    {field: 'borrow_loanperiod', title: '分期期限', width: '7%'},
                    {field: 'cust_name', title: '客户姓名', width: '9%'},
                    {field: 'binfo_opendate', title: '放款时间', width: '7%'},
                    {field: 'end_date', title: '下期还款', width: '8%'},
                    {field: 'borrow_invest', title: '投资打包', width: '9%'},
                    {field: 'bsta_name', title: '分期状态', width: '7%'}
                ]]
            });
		});
	</script>
</body>
</html>